﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Common="clr-namespace:Snipps.Infrastructure">

    <ResourceDictionary.MergedDictionaries>
        <Common:SharedResourceDictionary Source="/Snipps;component/Resources/NamedStyles/ColorBorderOnFocusStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style BasedOn="{StaticResource ColorBorderOnFocusStyle}"
           TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{DynamicResource BackgroundBrush}" />
        <Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter HorizontalAlignment="Center"
                                          VerticalAlignment="Center" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource ForegroundBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="{DynamicResource DisableBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource BackgroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>